@tailwind base;
@tailwind components;
@tailwind utilities;

/* 自定义工具类（从页面中迁移） */
@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
  .text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  .tree-line {
    @apply border-l-2 border-dashed border-gray-200 ml-3 pl-4;
  }
  .hover-scale {
    @apply transition-transform duration-300 hover:scale-105;
  }
  .fade-in {
    animation: fadeIn 0.5s ease-in-out;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .bg-gradient-primary {
    background: linear-gradient(135deg, #165DFF 0%, #36BFFA 100%);
  }
  .text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(135deg, #165DFF 0%, #36BFFA 100%);
  }
  .input-focus {
    @apply focus:border-primary focus:ring-2 focus:ring-primary/20 focus:outline-none;
  }
  .btn-hover {
    @apply hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300;
  }
  .card-hover {
    @apply hover:shadow-elevation-3 transition-all duration-300;
  }
  .shadow-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .transition-all-300 {
    transition: all 300ms ease-in-out;
  }
  
  /* 从AdminDashboard.html合并的样式 */
  .bg-education {
    background-image: 
      radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 20%),
      radial-gradient(circle at 80% 30%, rgba(79, 144, 255, 0.05) 0%, transparent 25%),
      radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 30%),
      radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 20%);
  }
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
  .education-icon {
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
  }
  .stat-card {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  }
  .chart-container {
    position: relative;
    height: 200px;
  }
}

/* 组件样式 */
@layer components {
  .sidebar-item {
    @apply flex items-center space-x-3 px-4 py-3 text-sidebar-item rounded-lg transition-all duration-200 cursor-pointer;
  }
  .sidebar-item:hover {
    @apply bg-primary/5 text-sidebar-item-active;
  }
  .sidebar-item.active {
    @apply bg-primary/10 text-sidebar-item-active font-medium;
  }
  .nav-item {
    @apply relative px-4 py-3 text-muted hover:text-primary transition-colors cursor-pointer;
  }
  .nav-item.active {
    @apply text-primary font-medium;
  }
  .nav-item.active::after {
    content: '';
    @apply absolute bottom-0 left-0 w-full h-0.5 bg-primary rounded-full;
  }
  .card-hover {
    transition: all 0.3s ease;
  }
  .card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.15);
  }
}
